package com.rem.designPattern.abstractFactory抽象工厂;

/**
 * 甜品类和子类
 *
 * @author Rem
 * @date 2022-11-14
 */
public abstract class Dessert {

    protected String name;

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }
}

class MatchaMousse extends Dessert {

    public MatchaMousse() {
        this.setName("抹茶慕斯");
    }
}

class Trimisu extends Dessert {
    public Trimisu() {
        this.setName("提拉米苏");
    }
}